package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.anno.TableInject;
import com.sky.dto.SetmealPageQueryDTO;
import com.sky.entity.Setmeal;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealMapper {

    /**
     * 根据分类id查询套餐的数量
     * @param id
     * @return
     */
    Integer countByCategoryId(Long id);

    Integer getByIds(List<Long> ids);

    Page<Setmeal> page(SetmealPageQueryDTO setmealPageQueryDTO);
    /**
     * 新增套餐
     * @param
     * @return
     */
    @TableInject(OperationType.INSERT)
    void save(Setmeal setmeal);

    void updateStatus(Setmeal setmeal);

    List<Setmeal> getListByIds(List<Long> ids);

    void delete(List<Long> ids);

    Setmeal getById(Long id);
}
